<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">

    <link rel="stylesheet" href="/css/another.css"/>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">

</head>
<body>


<div id="username-page">

    <div class="username-page-container">
        <h1 class="title">Type your username</h1>
        <h4 id="conversationForm"></h4>
        <form id="usernameForm" name="usernameForm">
            <div class="form-group">
                <input type="text" id="name" placeholder="Username" autocomplete="off" class="form-control"/>
            </div>
            <div class="form-group">
                <button type="submit" class="accent username-submit">Start Chatting</button>
            </div>
        </form>
    </div>
</div>


<div id="main-content" class="container" style="margin-top: 50px;display: none">
    <div class="row">
        <div class="col-md-3" id="randomLocal" style="font-size: 20px">
        </div>
        <div class="col-md-9" id="tokenLocal" style="word-break: break-all">
        </div>
    </div>
    <div class="row" style="margin-top: 50px">
        <div class="col-md-4">
            <form class="form-inline">
                <div class="form-group">
                    <label for="connect">WebSocket connection:</label>
                    <button id="connect" type="submit" class="btn btn-success active">Connect</button>
                    <button id="disconnect" class="btn btn-danger active" type="submit" disabled="disabled">Disconnect
                    </button>

                </div>
            </form>
        </div>
        <div class="col-md-8">
            <h5>在线用户<b id="countNumber">0</b>个</h5>
            <ul class="list-group" id="onLineUsers" style="max-height: 150px;overflow-y: scroll">
                <li class="list-group-item">点击connect按钮 显示在线用户</li>
            </ul>
        </div>
    </div>
    <div class="row" style="padding-top: 50px">
        <div class="col-md-8">
            <form class="form-inline">
                <div class="form-group">
                    <input type="text" id="message" class="form-control" placeholder="Type Message..."/>
                </div>
                <button id="send" class="btn btn-default" type="submit">发自己</button>
                <button id="sendAll" class="btn btn-default" type="submit">发所有人</button>
            </form>
        </div>
        <div class="col-md-4">
            <button type="button" class="primary" onclick="serverSend()">服务器http接口推送</button>
        </div>

    </div>

    <div class="row" style="margin-top: 50px">
        <div class="col-md-12">
            <h4 id="conversation"></h4>
            <!--class="hidden"-->

        </div>
    </div>
    <div id="chat-page">
        <div class="chat-container">
            <div class="chat-header">
                <h5>Message</h5>
            </div>

            <ul id="messageArea">
                <li class="chat-message" style="text-align: right;"><i
                        style="background-color: rgb(255, 152, 0);right: 10px">8</i><span>810030</span>
                    <p>Send to me！a</p></li>
                <li class="chat-message"><i
                        style="background-color: rgb(255, 152, 0);left: 10px">8</i><span>810030</span>
                    <p>Send to me！a</p></li>
                <li class="chat-message"><i
                        style="background-color: rgb(255, 152, 0);left: 10px">8</i><span>810030</span>
                    <p>Send to me！a</p></li>
            </ul>
        </div>
    </div>
</div>


<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdn.bootcss.com/sockjs-client/1.1.4/sockjs.min.js"></script>
<script src="https://cdn.bootcss.com/stomp.js/2.3.3/stomp.min.js"></script>
<script src="/js/another.js"></script>
</body>
</html>